{#
 This Source Code Form is subject to the terms of the Mozilla Public
 License, v. 2.0. If a copy of the MPL was not distributed with this
 file, You can obtain one at https://mozilla.org/MPL/2.0/.
#}

{% set utm_params = 'utm_source=www.mozilla.org&utm_medium=referral&utm_campaign=footer' %}

{% if ftl_file_is_active('navigation_refresh') and ftl_file_is_active('footer-refresh') %}
  {% include 'includes/protocol/footer/footer-refresh.html' %}
{% else %}
<footer class="mzp-c-footer {% if theme_class %}{{ theme_class }}{% endif %}" id="colophon" role="contentinfo">
  <div class="mzp-l-content">
    <nav class="mzp-c-footer-primary">
      <div class="mzp-c-footer-primary-logo">
        <a href="{{ url('mozorg.home') }}" data-link-position="footer" data-link-text="Mozilla">{{ ftl('footer-mozilla') }}</a>
      </div>
      <div class="mzp-c-footer-sections">
        <section class="mzp-c-footer-section">
          <h2 class="mzp-c-footer-heading" data-testid="footer-heading-company">
            {{ ftl('footer-company') }}
          </h2>
          <ul class="mzp-c-footer-list" data-testid="footer-list-company">
            <li><a href="{{ url('mozorg.about.manifesto') }}" data-link-position="footer" data-link-text="Mozilla Manifesto">{{ ftl('footer-mozilla-manifesto') }}</a></li>
            <li><a href="https://blog.mozilla.org/category/mozilla/news/?{{ utm_params }}&utm_content=company" data-link-position="footer" data-link-text="Press Center">{{ ftl('footer-press-center') }}</a></li>
            <li><a href="https://blog.mozilla.org/?{{ utm_params }}&utm_content=company" data-link-position="footer" data-link-text="Mozilla Blog">{{ ftl('footer-mozilla-blog', fallback='footer-corporate-blog') }}</a></li>
            <li><a href="{{ url('careers.home') }}" data-link-position="footer" data-link-text="Careers">{{ ftl('footer-careers') }}</a></li>
            <li><a href="{{ url('mozorg.contact.contact-landing') }}" data-link-position="footer" data-link-text="Contact">{{ ftl('footer-contact') }}</a></li>
            <li>
              <a class="mzp-c-button mzp-t-dark mzp-t-secondary footer-donate" href="{{ donate_url(location='moco-donate-footer') }}" data-link-text="Donate">
                <span class="mzp-c-button-icon-start">
                  <svg width="16" height="16" viewBox="0 0 16 16">
                    <path fill="#fff" d="M1.2,2.2c-1.5,1.5-1.5,4.2,0,5.7L8,15c2.3-2.4,4.5-4.7,6.9-7c1.5-1.5,1.5-4.2,0-5.7c-1.5-1.5-4-1.5-5.6,0L8,3.5 L6.7,2.3C5.1,0.6,2.7,0.6,1.2,2.2"/>
                  </svg>
                </span>
                {{ ftl('footer-donate') }}
              </a>
            </li>
          {% if LANG == "de" %}
            {# Legal requirement in Germany see issue #14240 #}
            <li><a href="{{ url('legal.impressum') }}" data-link-position="footer" data-link-text="Impressum">Impressum</a></li>
          {% endif %}
          </ul>
        </section>

        <section class="mzp-c-footer-section">
          <h2 class="mzp-c-footer-heading" data-testid="footer-heading-resources">
            {{ ftl('footer-resources') }}
          </h2>
          <ul class="mzp-c-footer-list" data-testid="footer-list-resources">
            <li><a href="{{ url('privacy') }}" data-link-position="footer" data-link-text="Privacy Hub">{{ ftl('footer-privacy-hub', fallback='footer-privacy') }}</a></li>
            {% if ftl_has_messages('footer-advertise') %}
              <li><a href="{{ url('mozorg.advertising.landing') }}" data-link-position="footer" data-link-text="Advertise with Mozilla">{{ ftl('footer-advertise') }}</a></li>
            {% endif %}
          </ul>
        </section>

        <section class="mzp-c-footer-section">
          <h2 class="mzp-c-footer-heading" data-testid="footer-heading-support">
            {{ ftl('footer-support') }}
          </h2>
          <ul class="mzp-c-footer-list" data-testid="footer-list-support">
            <li><a href="https://support.mozilla.org/?{{ utm_params }}&utm_content=support" data-link-position="footer" data-link-text="Product Help">{{ ftl('footer-product-help', fallback='footer-support') }}</a></li>
            <li><a href="https://bugzilla.mozilla.org/?{{ utm_params }}&utm_content=support" data-link-position="footer" data-link-text="File a Bug">{{ ftl('footer-file-a-bug') }}</a></li>
            <li><a href="https://pontoon.mozilla.org/?{{ utm_params }}&utm_content=support" data-link-position="footer" data-link-text="Localise Mozilla">{{ ftl('footer-localize-mozilla') }}</a></li>
          </ul>
        </section>

        <section class="mzp-c-footer-section">
          <h2 class="mzp-c-footer-heading" data-testid="footer-heading-developers">
            {{ ftl('footer-developers') }}
          </h2>
          <ul class="mzp-c-footer-list" data-testid="footer-list-developers">
            <li><a href="{{ url('firefox.developer.index') }}" data-link-position="footer" data-link-text="Firefox Developer Edition">{{ ftl('footer-developer-edition') }}</a></li>
            <li><a href="{{ url('firefox.channel.desktop') }}#beta" data-link-position="footer" data-link-text="Firefox Beta">{{ ftl('footer-beta') }}</a></li>
            <li><a href="{{ url('firefox.channel.android') }}#beta" data-link-position="footer" data-link-text="Firefox Beta for Android">{{ ftl('footer-beta-for-android') }}</a></li>
            <li><a href="{{ url('firefox.channel.desktop') }}#nightly" data-link-position="footer" data-link-text="Firefox Nightly">{{ ftl('footer-nightly') }}</a></li>
            <li><a href="{{ url('firefox.channel.android') }}#nightly" data-link-position="footer" data-link-text="Firefox Nightly for Android">{{ ftl('footer-nightly-for-android') }}</a></li>
            <li><a href="{{ url('firefox.enterprise.index') }}" data-link-position="footer" data-link-text="Firefox for Enterprise">{{ ftl('footer-enterprise') }}</a></li>
            <li><a href="https://firefox-source-docs.mozilla.org/devtools-user/?{{ utm_params }}&utm_content=developers" rel="external" data-link-position="footer" data-link-text="Tools">{{ ftl('footer-tools') }}</a></li>
          </ul>
        </section>

        <section class="mzp-c-footer-section">
          <h2 class="mzp-c-footer-heading-social">{{ ftl('footer-follow-mozilla') }}</h2>
          <ul class="mzp-c-footer-links-social">
            <li><a class="bluesky" href="https://bsky.app/profile/mozilla.org" data-link-position="footer" data-link-text="Bluesky (@mozilla.org)" translate="no">Bluesky<span> (@mozilla.org)</span></a></li>
            <li><a class="instagram" href="{{ mozilla_instagram_url() }}" data-link-position="footer" data-link-text="Instagram (@mozilla)">{{ ftl('footer-instagram') }}<span> (@mozilla)</span></a></li>
            <li><a class="linkedin" href="https://www.linkedin.com/company/mozilla-corporation/" data-link-position="footer" data-link-text="LinkedIn (@mozilla)">{{ ftl('footer-linkedin') }}<span> (@mozilla)</span></a></li>
            <li><a class="tiktok" href="https://www.tiktok.com/@mozilla" data-link-position="footer" data-link-text="TikTok (@mozilla)">{{ ftl('footer-tiktok') }}<span> (@mozilla)</span></a></li>
            <li><a class="spotify" href="https://open.spotify.com/show/0vT7LJMeVDxyQ2ZamHKu08?si=_uDRD6bRR_6M5YZyISGXgA" data-link-position="footer" data-link-text="Spotify (@mozilla)">{{ ftl('footer-spotify') }}<span> (@mozilla)</span></a></li>
          </ul>

          <h2 class="mzp-c-footer-heading-social">{{ ftl('footer-follow-firefox') }}</h2>
          <ul class="mzp-c-footer-links-social">
            <li><a class="bluesky" href="https://bsky.app/profile/firefox.com" data-link-position="footer" data-link-text="Bluesky (@firefox.com)" translate="no">Bluesky<span> (@firefox.com)</span></a></li>
            <li><a class="instagram" href="https://www.instagram.com/firefox/" data-link-position="footer" data-link-text="Instagram (@firefox)">{{ ftl('footer-instagram') }}<span> (@firefox)</span></a></li>
            <li><a class="youtube" href="https://www.youtube.com/user/firefoxchannel" data-link-position="footer" data-link-text="YouTube (@firefoxchannel)">{{ ftl('footer-youtube') }}<span> (@firefoxchannel)</span></a></li>
          </ul>
        </section>
      </div>
    </nav>
    <nav class="mzp-c-footer-secondary">
      <div class="mzp-c-footer-language">
       {% include 'includes/protocol/lang-switcher.html' %}
      </div>
      <div class="mzp-c-footer-legal">
        <ul class="mzp-c-footer-terms">
          <li><a href="{{ url('privacy.notices.websites') }}" data-link-position="footer" data-link-text="Privacy">{{ ftl('footer-websites-privacy-notice') }}</a></li>
          <li>
            {# Link to /privacy/websites/cookie-settings/ is a legal requirement and should not be removed. It must be present on every page (Issue 14213). #}
            <a href="{{ url('privacy.cookie-settings') }}" data-link-position="footer" data-link-text="Cookies">{{ ftl('footer-websites-cookies') }}</a>
          </li>
          <li><a href="{{ url('legal.index') }}" data-link-position="footer" data-link-text="Legal">{{ ftl('footer-websites-legal') }}</a></li>
          <li><a href="{{ url('mozorg.about.governance.policies.participation') }}" data-link-position="footer" data-link-text="Community Participation Guidelines">{{ ftl('footer-community-participation-guidelines') }}</a></li>
          {% if ftl_has_messages('footer-about-this-site') %}
            <li><a href="{{ url('mozorg.about.this-site') }}" data-link-position="footer" data-link-text="About this site">{{ ftl('footer-about-this-site') }}</a></li>
          {% endif %}
        </ul>
        <p class="mzp-c-footer-license" rel="license">
          {% set moco_link = 'href="%s" data-link-position="footer" data-link-text="Mozilla Corporation"'|safe|format(url('mozorg.home')) %}
          {% set mofo_link = 'href="https://foundation.mozilla.org/?utm_source=www.mozilla.org&utm_medium=referral&utm_campaign=footer" rel="external noopener" data-link-position="footer" data-link-text="Mozilla Foundation"'|safe %}
          {{ ftl('footer-visit-mozilla-corporations', moco_link=moco_link, mofo_link=mofo_link) }}<br>
          {{ ftl('footer-portions-of-this-content', url=url('foundation.licensing.website-content'), current_year=current_year|string) }}
        </p>
      </div>
    </nav>
  </div>
</footer>
{% endif %}
